

        var chooseToTop = href = null;
        var reference = start = 0;
        var judge = null;
        var picAnimateDelay = null;
        var times;
        window.onscroll = function(){
            if(!this.chooseToTop) return false; 
            window.scrollTo(0, reference - reference / times * start) 
        }
        function backToTop(){
            reference = Math.round(document.documentElement.scrollTop || document.body.scrollTop);
            var step = reference / times;
            console.log(reference);
            chooseToTop = setInterval(function(){
                console.log('c');
                if(start == times -1){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                    start = 0
                    clearInterval(chooseToTop);
                    chooseToTop = null;
                }
                var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
                
                var after = scrollTop - step;
                document.documentElement.scrollTop = document.body.scrollTop = after;
                start++;
                
            },10)
        }
        
        $(document).ready(function(){
            times = browserRedirect()?250:150;
            for(var p = 0;p < $('.choosePage>a').length;p++){
                $('.choosePage>a')[p].ind = p;
            }
            $('.choosePage>a').click(function(){
                
                $('.contn .box').removeClass('current');
                backToTop();
            })
        })